{% extends "CmsBundle::base.html.twig" %}

{% block  pluginStyles %}
    <link rel="stylesheet" href="/assets/cms/css/dropzone.min.css" />
{% endblock %}

{% block pageContent %}
        <form class="form-horizontal" role="form" method="post" action="{{ path("yearnfar_cms_image_index") }}">
            <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 缩略图片： </label>
                <div class="col-sm-9">
                    <img src="{{ current.url[1] }}" width="150" height="150" />
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 图片名称： </label>
                <div class="col-sm-9">
                    <input type="hidden" name="id" value="{{ current.id }}">
                    <input type="text" name="name" placeholder="名称" class="col-xs-10 col-sm-5" value="{{ current.name }}">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right" for="form-field-1"> 图片归类：</label>
                <div class="col-sm-9">
                    <select class="width-20 chosen-select" name="tid" id="form-field-select-3" data-placeholder="选择一个分类...">
                        {% for item in term %}
                            {% if item.id==current.tid %}
                                <option value="{{ item.id }}" selected="selected">{{ item.name2 }}</option>
                            {%  else %}
                                <option value="{{ item.id }}">{{ item.name2 }}</option>
                            {% endif %}
                        {% endfor %}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-1 control-label no-padding-right" for="form-field-1">图片描述：</label>
                <div class="col-sm-9">
                    <textarea class="autosize-intro col-sm-5" name="description">{{ current.description }}</textarea>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right"></label>
                <button class="btn btn-info" type="submit" name="submit" value="1">
                    <i class="ace-icon fa fa-ok bigger-110"></i>
                    提交
                </button>
                &nbsp; &nbsp; &nbsp;
                <button class="btn" type="reset">
                    <i class="ace-icon fa fa-undo bigger-110"></i>
                    重置
                </button>
            </div>
        </form>


{% endblock %}

{% block pluginScripts %}

{% endblock %}

{% block inlineScripts %}
    <script type="text/javascript">
        jQuery(function($){


        });
    </script>
{% endblock %}